{{define "title"}}技术晨读 {{end}}
{{define "content"}}
<div class="row">
	<div class="col-md-9 col-sm-6">
		<div class="sep20"></div>
		<ol class="breadcrumb">
			<li><a href="/">首页</a></li>
			<li class="active">技术晨读</li>
			<li class="active">{{if eq .rtype 0}}Go晨读{{else}}综合晨读{{end}}</li>
		</ol>
		<ul class="nav nav-tabs" role="tablist">
			<li role="presentation"{{if eq .rtype 0}} class="active"{{end}}><a href="/readings">Go晨读</a></li>
			<li role="presentation"{{if eq .rtype 1}} class="active"{{end}}><a href="/readings?rtype=1">综合晨读</a></li>
		</ul>
		{{range .readings}}
		<article class="article box_white reading">
			<div class="row">
				<div class="pull-left">
					<a href="/readings/{{.Id}}" target="_blank" title="阅读全文">
						<div class="time">
							<span>{{.Rdate}}</span>
						</div>
					</a>
				</div>
				<div class="reading-content">
					<p>{{.Content}} <a class="btn btn-success btn-xs" href="/readings/{{.Id}}" target="_blank" title="阅读全文">我要晨读</a>{{if .Urls}}&nbsp;&nbsp;相关阅读：{{range .Urls}}<a class="btn btn-info btn-xs" href="/wr?u={{.}}" target="_blank"><i class="glyphicon glyphicon-link"></i> 网页链接</a>&nbsp;{{end}}{{end}}</p>
				</div>
			</div>
			<div class="row">
				<div class="col-md-8 metatag">
					<i class="glyphicon glyphicon-calendar"></i>
					<span class="date timeago" title="{{.Ctime}}"></span>
					<i class="glyphicon glyphicon-user"></i>
					<a href="/user/{{.Username}}" class="author" title="发布人">{{.Username}}</a>
				</div>
				<div class="col-md-4 metatag text-right">
					<span class="view" title="阅读数">
						<i class="glyphicon glyphicon-eye-open"></i>
						已有<span>{{.Clicknum}}</span>人晨读
					</span>
				</div>
			</div>
		</article>
		{{else}}
		<article class="article box_white reading">
			<div class="row">暂无晨读</div>
		</article>
		{{end}}
		<ul class="pager">
			{{if .page.has_prev}}
			<li class="previous"><a href="/readings?rtype={{.rtype}}&lastid={{.page.prev_id}}">&larr; 上一页</a></li>
			{{end}}
			{{if .page.has_next}}
			<li class="next"><a href="/readings?rtype={{.rtype}}&lastid={{.page.next_id}}">下一页 &rarr;</a></li>
			{{end}}
		</ul>
	</div>
	<div class="col-md-3 col-sm-6">
		<div class="sep20"></div>

		{{include "sidebar/concern.html" .}}
		
		{{include "sidebar/article.html" .}}
		
		{{include "sidebar/topic.html" .}}

		{{if .pos_ad.right1}}
		<div class="box_white sidebar" id="ad-right1">
			{{if eq .pos_ad.right1.AdType 0}}
				{{noescape .pos_ad.right1.Code}}
			{{end}}
		</div>
		{{end}}

	</div>
</div>
{{end}}
{{define "css"}}
<style type="text/css">
.reading .time {width:80px; text-align: center; height:80px; line-height:80px; background: #DB6D4C;color: #fff;}
.reading .pull-left a:hover {text-decoration: none;}
.reading .reading-content {margin-left:100px;}
.reading .reading-content p {margin-top: 9.5px;}
</style>
{{end}}
{{define "js"}}
<script type="text/javascript">
// 需要加载的侧边栏
SG.SIDE_BARS = [
	"/topics/recent",
	"/articles/recent"
];
</script>

{{if .pos_ad.right1}}
	{{if eq .pos_ad.right1.AdType 1}}
		{{noescape .pos_ad.right1.Code}}
	{{end}}
{{end}}

{{end}}